var r = function(r) {
    return Array.from(new Array(r).keys());
}, n = function(r) {
    return Math.floor(Math.random() * r);
}, t = function(r, n, t) {
    var a = r[n];
    return r[n] = r[t], r[t] = a, r;
};

module.exports = function(a, e) {
    for (var o = (a = Array.isArray(a) ? a : r(a)).length; o--; ) {
        var u = n(o + 1);
        a = t(a, o, u);
    }
    return a.slice(0, e);
};